package structurePattern.adapter;

public class Client {

    public static void main(String[] args) {
        HongkongSwitch switchHK = new HongkongSwitch();
        PowerAdapter powerAdapter = new PowerAdapter();
        ElectricSocket chinaSocket = new ChinaSocket();
        ElectricSocket hongkongSocket = new HongkongSocket();

        System.out.println("港版switch在香港充电");
        switchHK.charge(hongkongSocket);

        System.out.println("港版switch在大陆用适配器充电");
        switchHK.charge(powerAdapter.transfer(chinaSocket));

        System.out.println("港版switch在大陆直接充电");
        switchHK.charge(chinaSocket);
    }
}
